import org.apache.commons.io.IOUtils;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class IOUtils_write {
    public static void main(String[] args) throws FileNotFoundException, IOException {

        try(OutputStream os=new FileOutputStream("test5.txt")){
            IOUtils.write("sahjsdhjad",os,"utf-8");
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
